var t = getApp();

Page({
    data: {
        orderId: ""
    },
    onLoad: function(t) {
        this.setData({
            orderId: t.orderid
        }), this.getshare();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareTimeline: function() {
        var t = wx.getStorageSync("yz_uid"), o = "";
        return t && (o = t), {
            title: this.data.groups_title ? this.data.groups_title : "",
            query: "id=" + this.data.orderId + "&mid=" + o
        };
    },
    onShareAppMessage: function() {
        var t = wx.getStorageSync("yz_uid"), o = "";
        return t && (o = t), {
            title: this.data.groups_title ? this.data.groups_title : "",
            path: "/packageD/getCoupon/getCoupon?id=" + this.data.orderId + "&mid=" + o
        };
    },
    getshare: function() {
        var o = this, e = t.getNetAddresss("coupon.share-coupon.share");
        e += "&order_ids=" + this.data.orderId, t._getNetWork({
            url: e,
            success: function(t) {
                var e = t.data;
                1 == e.result ? (console.log(e), o.setData({
                    allData: e.data
                })) : wx.showToast({
                    icon: "none",
                    title: e.msg,
                    duration: 1e3
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    }
});